package com.BaiBai;

import com.BaiBai.config.JavaAopConfig;
import com.BaiBai.service.Calculator;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

@SpringJUnitConfig(value=JavaAopConfig.class)
public class SpringTestAop {
    @Autowired
    private Calculator calculator;
    @Test
    public void testAop() {
        int add=calculator.add(1, 2);
        System.out.println("add = " + add);
    }
}
